package com.aabte.lota.auth.auth.bean.enums;

import com.aabte.commons.rest.errorcode.IApiErrorCode;
import lombok.Getter;
import lombok.ToString;

/**
 * @author Daniel
 * @version 1.0
 * @date 2020/4/5
 */
@ToString
@Getter
public enum LoginApiErrorCode implements IApiErrorCode {
  LOGIN_FAILED(400, 4000L, "Login failed"),
  USERNAME_OR_PASSWORD_INCORRECT(400, 4001L, "Username or password incorrect"),
  LOCKED_ACCOUNT(400, 4002L, "Account locked"),
  EXCESSIVE_ATTEMPTS(400, 4002L, "Excessive attempts"),
  TOKEN_IS_BLANK(400, 4003L, "token cannot be blank"),
  AUTHENTICATION_REQUIRED(400, 4004L, "Authentication required"),
  TOKEN_INCORRECT(400, 4004L, "Token incorrect");

  private Integer status;
  private Long code;
  private String msg;

  LoginApiErrorCode(Integer status, Long code, String msg) {
    this.status = status;
    this.code = code;
    this.msg = msg;
  }
}
